<div class="row wrapper white-bg page-heading" style="padding-bottom: 80px;">
  <div class="container-fluid">
    <h2>{{commodityAddCtrl.commodityId?"编辑商品":"新增商品"}}</h2>
  </div>
  <hr/>
  <div class="container-fluid">
    <div class="col-md-11 col-table">
      <table class="table table-bordered">
      	
        <tr class="col-table-tr">
          <td>商品标题</td>
          <td>
            <div class="col-md-offset-1 col-md-4">
              <div class="form-group">
                <input ng-model="commodityAddCtrl.caption" class="form-control" placeholder="请输入商品标题">
              </div>
            </div>
          </td>
        </tr>

        <tr class="col-table-tr">
          <td>商品简短描述</td>
          <td>
            <div class="col-md-offset-1 col-md-8">
              <div class="form-group">
                <input ng-model="commodityAddCtrl.content" class="form-control" placeholder="请输入商品简短描述">
              </div>
            </div>
          </td>
        </tr>
				<!--商品类型-->
        <tr class="col-table-tr">
          <td>商品类型</td>
          <td>
            <div class="col-md-offset-1 col-md-4">
              <div class="form-group">
                <select class="form-control" ng-model="commodityAddCtrl.type" >
                  <option value="自营">自营</option>
                  <option value="出租">出租</option>
                </select>
              </div>
            </div>
          </td>
        </tr>
 
        <!--盒子原价-->
        <tr class="col-table-tr">
          <td>商品原价</td>
          <td>
            <div class="col-md-offset-1 col-md-4">
              <div class="form-group">
                <input ng-model="commodityAddCtrl.originalPrice" class="form-control" placeholder="请输入商品原价">
              </div>
            </div>
          </td>
        </tr>
        <!--盒子现价-->
        <tr class="col-table-tr">
          <td>商品现价</td>
          <td>
            <div class="col-md-offset-1 col-md-4">
              <div class="form-group">
                <input ng-model="commodityAddCtrl.nowPrice" class="form-control" placeholder="请输入商品现价">
              </div>
            </div>
          </td>
        </tr>
        
        <!--盒子缩略图-->
        <tr class="col-table-tr">
          <td>
            商品缩略图
            <br>
            (750*750)
          </td>
          <td>
            <div class="col-md-offset-1">
              <div class="commodity-icon-upload">
                <img ng-src="{{commodityAddCtrl.bgPicture}}" style="width:100px;height:100px;">
              </div>
              <br>
              <div class="commodity-icon-upload">
                <span class="btn btn-primary btn-imgUpload"><input type="file" nv-file-select uploader="commodityAddCtrl.fileUpload.pictureUploader"
                    options="{fileType:'bgPicture'}" accept="image/*">上传商品缩略图</span>
              </div>
            </div>
          </td>
        </tr>
        <!--盒子展示图-->
        <tr class="col-table-tr">
          <td>商品展示图
            <br>
            (750*750)
          </td>
          <td>
            <div class="col-md-offset-1">
              <div ng-repeat="icon in commodityAddCtrl.commodityIconList track by $index" class="pull-left"
                   style="margin-right:30px;">
                <img style="width:100px;height:100px" ng-src="{{icon}}" class="commodity-icon"/>
                <p style="margin-top:10px;" class="text-center"><a class="btn btn-danger btn-xs"
                                                                   ng-click="commodityAddCtrl.deleteIcon($index)">删除</a>
                </p>
              </div>
              <div class="commodity-icon-upload pull-left">
                <span class="btn-imgsUpload"><input type="file" nv-file-select uploader="commodityAddCtrl.fileUpload.pictureUploader"
                  options="{fileType:'commodityIcon'}" accept="image/*">+</span>
              </div>
            </div>
          </td>
        </tr>
        <!--盒子库存-->
        <tr class="col-table-tr">
          <td>商品库存</td>
          <td>
            <div class="col-md-offset-1 col-md-4">
              <div class="form-group">
                <input ng-model="commodityAddCtrl.stock" class="form-control" placeholder="请输入商品库存">
              </div>
            </div>
          </td>
        </tr>
        <!--盒子详情-->
        <tr class="col-table-tr">
          <td>商品详情</td>
          <td>
            <div class="col-md-offset-1 col-md-10">
              <div class="form-group">
                <summernote style="width:80%;" ng-model="commodityAddCtrl.detail" lang="zh-CN"
                            config="commodityAddCtrl.options"></summernote>
              </div>
            </div>
          </td>
        </tr>
        
      </table>
      <button type="submit" class="btn btn-default col-md-3 col-md-offset-2" ui-sref="home.commodity.commodityList">取消
      </button>
      <button type="submit" class="btn btn-info col-md-3 col-md-offset-1" ng-click="commodityAddCtrl.submit()">提交
      </button>
    </div>
  </div>
</div>
